using System;
using UserManager;

namespace SMS.UserManager
{
    public class UserInfo : UserManager.IMember
    {
        private string _mobileNo;
        private string _fullName;
        private long _id;
        private string _sesCode;
        private string _username;
        private DateTime _lastLogin;
        private DateTime _createdDate;
        private string _email;
        private int _amount;
        private string _verifyCode;
        private byte _userType;

        public DateTime CreatedDate
        {
            get { return this._createdDate; }
        }

        public byte UserType
        {
            get { return this._userType; }
        }

        public DateTime LastLogin
        {
            get { return this._lastLogin; }
        }

        public string FullName
        {
            get { return this._fullName; }
        }

        public long MemberID
        {
            get { return this._id; }
        }

        public string SessionCode
        {
            get { return this._sesCode; }
        }

        public string Username
        {
            get { return this._username; }
        }

        public string Email
        {
            get { return this._email; }
        }

        public int Amount
        {
            get { return this._amount; }
        }

        public string MobileNo
        {
            get { return this._mobileNo; }
        }

        public string VerifyCode
        {
            get { return this._verifyCode; }
        }

        public UserInfo(MembersInfo mem)
        {
            if (mem != null)
            {
                this._id = mem.MemberID;
                this._fullName = mem.FullName;
                this._username = mem.UserName;
                this._sesCode = "";
                this._createdDate = mem.CreatedDate;
                this._lastLogin = mem.LastLogin;
                this._email = mem.Email;
                this._mobileNo = mem.MobileNo;
                this._amount = mem.Amount;
                this._verifyCode = mem.VerifyCode;
                this._mobileNo = mem.MobileNo;
                this._userType = mem.Type;
            }
        }
    }
}
